//写所有的后台接口，做到 后台接口统一管理
import request from "../utils/request";

//1.设备概览接口
export const $deviceCount = () => {
  return request.get("/device/count");
};
//2.传感器 接口
//图表数据
export const $sensorCount = () => {
  return request.get("/sensor/count");
};
//3.设备数据 接口
export const $devicesensorList = () => {
  return request.get("/device/sensorList");
};
//4.1设备网关 接口
//使用 data 接收从页面传过来的参数
export const $gatewayList = (data) => {
  //get 函数中的第二个数据， 就是传给后台的参数
  return request.get("/gateway/list", data);
};
//4.2 节点群组  列表
export const $groupList = (params) => {
  return request.get("/group/list", { params });
};
//添加
export const $groupAdd = (data) => {
  return request.post("/group/add", data);
};
//修改
export const $groupEdit = (data) => {
  return request.post("/group/edit", data);
};
//删除
export const $groupDel = (data) => {
  return request.post("/group/del", data);
};
//5.传感器列表 接口
export const $getSensorList = (data) => {
  return request.get("/sensor/list", data);
};
//6.充值记录 接口
export const $feeRechargeList = () => {
  return request.get("/fee/rechargeList");
};
//7.测试类型 接口
export const $measurementList = () => {
  return request.get("/measurement/list");
};
//8.账号列表 接口
export const $accountList = () => {
  return request.get("/account/list");
};
//9.安全列表 接口
export const $securityList = () => {
  return request.get("/security/list");
};
//10 等人api
export const $accountLogin = (data) =>{
  return request.post('/account/login',data)
}